<div class="row">
	<div class="twelve columns">
		<div class="box_c">
			<div class="box_c_heading cf">
				<div class="box_c_ico"><img src="img/ico/icSw2/16-List.png" alt="" /></div>
				<p>{{Configuration de votre site internet}}</p>
			</div>
			<div class="box_c_content form_a" style="padding:10px 0">
				<div class="ui_tabs" style="width:98%; margin:0 auto">
					<ul>
						<li><a href="#tabs-1">{{Configuration générale}}</a></li>
						<li><a href="#tabs-2">{{Gestion du carrousel}}</a></li>
						<li><a href="#tabs-3">{{A propos}}</a></li>
						<li><a href="#tabs-4">{{Mentions légales}}</a></li>
					</ul>
					<div id="tabs-1">
						<form action="" method="post" class="nice">
							<div class="formRow">
								<h3 class="sepH_a">{{Gestion du cache de votre site internet}}</h3>
								<div class="row">
									<div class="ten columns">
										<p>Le cache ? C'est quoi ça ?<br />
											Le cache est un système permettant de stocker des pages dynamiques (qui se nourrissent d'informations 
											provenant d'une source de données avant d'être affichées) de façon temporaire afin d'alléger les requêtes 
											envoyées au serveur. Ce système permet d'améliorer de façon très significative les performances de votre site 
											internet en limitant le temps d'affichage.</p>
										<p>Le cache de votre site internet est réglé par défaut sur 5 minutes, 
											ce qui signifie que vos pages dynamiques (fiches produits, actualités, etc..) se mettent à jour 
											automatiquement toutes les 5 minutes. Ne soyez pas surpris donc de ne pas voir tout de suite la modification 
											que vous venez d'effectuer par exemple... ;-)<br />
											<u>Faites vos réglages :</u> 
										</p>
									</div>
									<div class="four columns" >
										<input id="cachecontrol" type="checkbox" <?php echo ($_APP->getCacheConfig() === true ? 'checked="checked"' : ''); ?> />
										<div class="clear" style="padding:0; margin:0 0 10px 0"></div>
									</div>
									<div class="seven columns">
										<label style="float:left; margin:6px 5px 0 0">{{Expire au bout de}}</label> 
										<select id="cacheexpire" style="float:left; margin:3px 0 0 0">
											<option value="300" <?php echo ($_APP->getCacheExpire() == 300 ? 'selected' : ''); ?>>5min</option>
											<option value="600" <?php echo ($_APP->getCacheExpire() == 600 ? 'selected' : ''); ?>>10min</option>
											<option value="1200" <?php echo ($_APP->getCacheExpire() == 1200 ? 'selected' : ''); ?>>20min</option>
											<option value="2400" <?php echo ($_APP->getCacheExpire() == 2400 ? 'selected' : ''); ?>>40min</option>
											<option value="3600" <?php echo ($_APP->getCacheExpire() == 3600 ? 'selected' : ''); ?>>1h</option>
										</select>
										<div class="clear" style="padding:0; margin:0"></div>
									</div>
								</div>
							</div>
							<div class="formRow">
								<h3 class="sepH_a">{{Vos données / Votre société}}</h3>
								<div class="row">
									<div class="five columns">
										<label >{{Civilité}}</label>
										<input type="hidden" name="parentsList" id="parentsList" value="" />
										<select name="parentid" class="chzn-select" tabindex="6">
											<?php foreach($civilities as $civility){ ?>
												<option <?php if(!empty($config['owner']['civility']) and $config['owner']['civility'] == $civility){ echo 'selected'; }elseif(!empty($_POST['civility']) and $_POST['civility'] == $civility){ echo 'selected'; } ?> value="<?php echo $civility; ?>"><?php echo $civility; ?></option>
											<?php } ?>
										</select>
									</div>

									<div class="seven columns"></div>
								</div>
								<div class="row">
									<div class="five columns">
										<label class="sepH_b">{{Nom}}</label>
										<input value="<?php if(!empty($config['owner']['name'])){ echo $config['owner']['name']; }elseif(!empty($_POST['name'])){ echo $_POST['name']; } ?>" style="margin-top:-2px" type="text" name="name" class="input-text medium" />
									</div>
									<div class="seven columns">
										<label>{{Nom de votre société}}</label>
										<input value="<?php if(!empty($config['owner']['agency'])){ echo $config['owner']['agency']; }elseif(!empty($_POST['agency'])){ echo $_POST['agency']; } ?>" style="margin-top:-2px" type="text" name="agency" class="input-text large" />
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label class="sepH_b">{{Prénom}}</label>
										<input value="<?php if(!empty($config['owner']['firstname'])){ echo $config['owner']['firstname']; }elseif(!empty($_POST['firstname'])){ echo $_POST['firstname']; } ?>" style="margin-top:-2px" type="text" name="firstname" class="input-text medium" />
									</div>
									<div class="seven columns">
										<label>{{Adresse}}</label>
										<input value="<?php if(!empty($config['owner']['address1'])){ echo $config['owner']['address1']; }elseif(!empty($_POST['address1'])){ echo $_POST['address1']; } ?>" style="margin-top:-2px" type="text" name="address1" class="input-text large" />
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label class="sepH_b">{{N° de téléphone}}</label>
										<input value="<?php if(!empty($config['owner']['phone'])){ echo $config['owner']['phone']; }elseif(!empty($_POST['phone'])){ echo $_POST['phone']; } ?>" style="margin-top:-2px" type="text" name="phone" class="input-text medium" />
									</div>
									<div class="seven columns">
										<label>{{Adresse (suite)}}</label>
										<input value="<?php if(!empty($config['owner']['address2'])){ echo $config['owner']['address2']; }elseif(!empty($_POST['address2'])){ echo $_POST['address2']; } ?>" style="margin-top:-2px" type="text" name="address2" class="input-text large" />
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label>{{Identifiant}}</label>
										<input value="<?php if(!empty($config['owner']['login'])){ echo $config['owner']['login']; }elseif(!empty($_POST['login'])){ echo $_POST['login']; } ?>" style="margin-top:-2px" type="text" name="login" class="input-text medium" />
									</div>
									<div class="seven columns">
										<label>{{Code postal}}</label>
										<input value="<?php if(!empty($config['owner']['zipcode'])){ echo $config['owner']['zipcode']; }elseif(!empty($_POST['zipcode'])){ echo $_POST['zipcode']; } ?>" style="margin-top:-2px" type="text" name="zipcode" class="input-text large" />
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label>{{Mot de passe}}</label>
										<input value="<?php if(!empty($config['owner']['password'])){ echo $config['owner']['password']; }elseif(!empty($_POST['password'])){ echo $_POST['password']; } ?>" style="margin-top:-2px" type="password" name="password" class="input-text medium" />
									</div>
									<div class="seven columns">
										<label>{{Ville}}</label>
										<input value="<?php if(!empty($config['owner']['city'])){ echo $config['owner']['city']; }elseif(!empty($_POST['city'])){ echo $_POST['city']; } ?>" style="margin-top:-2px" type="text" name="city" class="input-text large" />
									</div>
								</div>
								<div class="row">
									<div class="five columns"></div>
									<div class="seven columns">
										<label>{{Pays}}</label>
										<input value="<?php if(!empty($config['owner']['country'])){ echo $config['owner']['country']; }elseif(!empty($_POST['country'])){ echo $_POST['country']; } ?>" style="margin-top:-2px" type="text" name="country" class="input-text large" />
									</div>
								</div>
							</div>

							<div class="formRow">
								<h3 class="sepH_a">{{Données du site internet}}</h3>
								<div class="row">
									<div class="five columns">
											<label>{{Nom du site (pas de caractères de ponctuation type "!","|","\", etc... Seules les virgules et les points sont autorisés)}}</label>
											<input value="<?php if(!empty($config['front']['title'])){ echo $config['front']['title']; }elseif(!empty($_POST['title'])){ echo $_POST['title']; } ?>" style="margin-top:-2px" type="text" name="title" class="input-text medium" />
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label>{{Mots clés du site internet}}</label>
										<textarea name="tags" id="expand_textarea" cols="1" rows="1" class="auto_expand expand" style="min-height:64px"><?php if(!empty($config['front']['tags'])){ echo $config['front']['tags']; }elseif(!empty($_POST['tags'])){ echo $_POST['tags']; } ?></textarea>
									</div>

									<div class="seven columns">
										<label>{{Description du site internet}}</label>
										<textarea name="description" id="expand_textarea" cols="1" rows="1" class="auto_expand expand" style="min-height:64px"><?php if(!empty($config['front']['description'])){ echo $config['front']['description']; }elseif(!empty($_POST['description'])){ echo $_POST['description']; } ?></textarea>
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label>{{Copyright}}</label>
										<input value="<?php if(!empty($config['front']['copyright'])){ echo $config['front']['copyright']; }elseif(!empty($_POST['copyright'])){ echo $_POST['copyright']; } ?>" style="margin-top:-2px" type="text" name="copyright" class="input-text medium" />
									</div>

									<div class="seven columns">
										<label class="sepH_b">{{Nom de la session principale}}</label>
										<input value="<?php if(!empty($config['sessions']['main'])){ echo $config['sessions']['main']; }elseif(!empty($_POST['session'])){ echo $_POST['session']; } ?>" style="margin-top:-2px" type="text" name="session" class="input-text large" />
									</div>
								</div>
							</div>

							<div class="formRow">
								<h3 class="sepH_a">{{E-mails}}</h3>
								<div class="row">
									<div class="five columns">
										<label>{{Adresse de contact principale}}</label>
										<input value="<?php if(!empty($config['emails']['contact'])){ echo $config['emails']['contact']; }elseif(!empty($_POST['emailcontact'])){ echo $_POST['emailcontact']; } ?>" style="margin-top:-2px" type="text" name="emailcontact" class="input-text medium" />
									</div>

									<div class="seven columns">
										<label>{{Adresse sans retour}} (no-reply)</label>
										<input value="<?php if(!empty($config['emails']['no-reply'])){ echo $config['emails']['no-reply']; }elseif(!empty($_POST['emailnoreply'])){ echo $_POST['emailnoreply']; } ?>" style="margin-top:-2px" type="text" name="emailnoreply" class="input-text large" />
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label>{{Adresse additionnelle}} 1</label>
										<input value="<?php if(!empty($config['emails']['additional_1'])){ echo $config['emails']['additional_1']; }elseif(!empty($_POST['additional_1'])){ echo $_POST['additional_1']; } ?>" style="margin-top:-2px" type="text" name="additional_1" class="input-text medium" />
									</div>

									<div class="seven columns">
										<label>{{Adresse additionnelle}} 2</label>
										<input value="<?php if(!empty($config['emails']['additional_2'])){ echo $config['emails']['additional_2']; }elseif(!empty($_POST['additional_2'])){ echo $_POST['additional_2']; } ?>" style="margin-top:-2px" type="text" name="additional_2" class="input-text large" />
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label>{{Adresse additionnelle}} 3</label>
										<input value="<?php if(!empty($config['emails']['additional_3'])){ echo $config['emails']['additional_3']; }elseif(!empty($_POST['additional_3'])){ echo $_POST['additional_3']; } ?>" style="margin-top:-2px" type="text" name="additional_3" class="input-text medium" />
									</div>

									<div class="seven columns">
										<label>{{Adresse additionnelle}} 4</label>
										<input value="<?php if(!empty($config['emails']['additional_4'])){ echo $config['emails']['additional_4']; }elseif(!empty($_POST['additional_4'])){ echo $_POST['additional_4']; } ?>" style="margin-top:-2px" type="text" name="additional_4" class="input-text large" />
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label>{{Adresse Paypal de test}}</label>
										<input value="<?php if(!empty($config['paypal']['sandbox'])){ echo $config['paypal']['sandbox']; }elseif(!empty($_POST['paypalsandbox'])){ echo $_POST['paypalsandbox']; } ?>" style="margin-top:-2px" type="text" name="paypalsandbox" class="input-text medium" />
									</div>

									<div class="seven columns">
										<label>{{Adresse Paypal de production}}</label>
										<input value="<?php if(!empty($config['paypal']['production'])){ echo $config['paypal']['production']; }elseif(!empty($_POST['paypalproduction'])){ echo $_POST['paypalproduction']; } ?>" style="margin-top:-2px" type="text" name="paypalproduction" class="input-text large" />
									</div>
								</div>
							</div>
							<!--
							<div class="formRow">
								<h3 class="sepH_a">Configuration de votre boîte réception</h3>
								<div class="row">
									<div class="five columns">
										<label>Identifiant</label>
										<input value="<?php if(!empty($config['pop']['id'])){ echo $config['pop']['id']; }elseif(!empty($_POST['idinbox'])){ echo $_POST['idinbox']; } ?>" style="margin-top:-2px" type="text" name="idinbox" class="input-text medium" />
									</div>

									<div class="seven columns">
										<label>Mot de passe</label>
										<input value="<?php if(!empty($config['pop']['pass'])){ echo $config['pop']['pass']; }elseif(!empty($_POST['pass'])){ echo $_POST['pass']; } ?>" style="margin-top:-2px" type="text" name="pass" class="input-text large" />
									</div>
								</div>
								<div class="row">
									<div class="five columns">
										<label>Serveur pop</label>
										<input value="<?php if(!empty($config['pop']['host'])){ echo $config['pop']['host']; }elseif(!empty($_POST['host'])){ echo $_POST['host']; } ?>" style="margin-top:-2px" type="text" name="host" class="input-text medium" />
									</div>

									<div class="seven columns">
										<label>Port</label>
										<input value="<?php if(!empty($config['pop']['port'])){ echo $config['pop']['port']; }elseif(!empty($_POST['port'])){ echo $_POST['port']; } ?>" style="margin-top:-2px" type="text" name="port" class="input-text large" />
									</div>
								</div>
							</div>
							-->
							<div class="formRow">
								<button name="savesettings" value="1" type="submit" class="button green small radius nice">{{Ok}}</button>
							</div>
						</form>
					</div>
					<div id="tabs-2">
						<form method="post" action="">
							<div class="formRow">
								<label class="sepH_b">{{Ajouter une ou plusieurs illustrations}}</label>
								<div id="uploader">
									<p>You browser doesn't have Flash, HTML5 or HTML4 support or you are using touch device.</p>
									<input type="file" name="pl_file" id="pl_file" />
								</div>
							</div>

							<?php if(!empty($assets)){ ?>
							<div class="formRow picsTable">
								<div class="row">
									<div class="twelve columns">
										<div class="box_c">
											<div class="box_c_heading cf box_actions">
												<div class="box_c_ico"><img src="img/ico/icSw2/16-Image2-2.png" alt="" /></div>
												<p>{{Illustrations téléchargées}}</p>
											</div>
											<div class="box_c_content" style="display: none">
												<table cellpadding="0" cellspacing="0" border="0" class="display dt_act" id="dt_gal">
													<thead>
														<tr>
															<th class="chb_col"><input type="checkbox" class="chSel_all" /></th>
															<th class="essential">{{Image}}</th>
															<th class="essential">{{Nom}}</th>
															<th>{{Taille}}</th>
															<th>{{Date}}</th>
															<th>{{Actions}}</th>
														</tr>
													</thead>
													<tbody>
														<?php foreach($assets as $key => $value){ ?>
														<tr>
															<td class="chb_col"><input type="checkbox" name="row_sel" id="sel_<?php echo $key; ?>" /></td>
															<td <?php echo ($value['status'] == 1 ? 'style="border:#ee4578 1px solid"' : ''); ?>>
																<a class="fancyImg" href="../dynamics/carrousel/asset.<?php echo (int)$key . '.jpg'; ?>" title="asset.<?php echo (int)$key; ?>.jpg">
																	<img alt="" src="../dynamics/carrousel/asset.<?php echo (int)$key . '.jpg'; ?>" style="height:70px;">
																</a>
															</td>
															<td><small class="s_color">asset.<?php echo (int)$key; ?>.jpg</small></td>
															<td>200 KB</td>
															<td><?php echo date('\L\e d/m/Y \à H:i:s',strtotime($value['date'])); ?></td>
															<td>
																<a href="javascript:void(0)" class="sepV_a" title="{{Modifier}}"><img src="img/ico/pencil_gray.png" alt="" /></a>
																<a href="javascript:void(0)" onClick="$('.picsTable #sel_<?php echo $key; ?>').attr('checked',true); $('.picsTable .box_c_content .delete_all_rows').trigger('click');" title="{{Supprimer}}"><img src="img/ico/trashcan_gray.png" alt="" /></a>
															</td>
														</tr>
														<?php } ?>
													</tbody>
												</table>
											</div>
										</div>
									</div>
								</div>
							</div>
							<?php } ?>

							<div class="formRow">
								<button name="uploadcarrousel" value="1" type="submit" class="button green small radius nice">Sauvegarder les images</button>
							</div>
						</form>
					</div>
					<div id="tabs-3">
						<form method="post" action="">
							<div class="formRow">
								<label >Présentation de votre site, votre activité</label>
								<textarea name="about" cols="1" rows="1" class="expand tinymce" style="height:400px"><?php echo file_get_contents(__ABOUT__); ?></textarea>
							</div>

							<div class="formRow">
								<button name="saveabout" value="1" type="submit" class="button green small radius nice">Ok</button>
							</div>
						</form>
					</div>
					<div id="tabs-4">
						<form method="post" action="">
							<div class="formRow">
								<label >Vos mentions légales</label>
								<textarea name="legals" cols="1" rows="1" class="expand tinymce" style="height:400px"><?php echo file_get_contents(__LEGALS__); ?></textarea>
							</div>

							<div class="formRow">
								<button name="savelegals" value="1" type="submit" class="button green small radius nice">Ok</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
